#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"


struct AA
{
	int a = 1;
	int b = 2;
};

namespace x
{
	void test_list()
	{
		list<int> lt;
		lt.push_back(1);
		lt.push_back(2);
		lt.push_back(3);
		lt.push_back(4);
		lt.insert(lt.begin(), 5);
		lt.insert(lt.begin(), 6);
		/*lt.push_front(6);
		lt.pop_back();
		lt.pop_front();*/
		list<int>::iterator it = lt.begin();

		/*while (it != lt.end())
		{
			cout << *it << " ";
			it++;
		}

		cout << endl;

		for (auto e : lt)
		{
			cout << e << " ";
		}
		cout << endl;*/
		print_container(lt);
	}

	void test_list1()
	{
		list<AA> lt;
		lt.push_back(AA());
		lt.push_back(AA());
		lt.pop_back();
		list<AA>::iterator it = lt.begin();
		while (it != lt.end())
		{
			cout << it->a<<":"<<it->b << endl;
			++it;
		}
		//print_container(lt);
	}

	void test_list2()
	{
		list<int> lt1;
		lt1.push_back(1);
		lt1.push_back(2);
		lt1.push_back(3);
		lt1.push_back(4);
		list<int> lt2(lt1);
		list<int> lt3;
		lt3 = lt2;
		print_container(lt1);
		print_container(lt2);
		print_container(lt3);
	}
	void test_list3()
	{
		list<int> lt({ 1,2,3,4,5 });
		list<int> lt1={ 1,2,3,4,5 };
	}
}